/**
 * 
 */
package evolution.mlp.functions;

/**
 * @author camille
 * 
 */
public class Gaussian implements Function{

	private double mu;
	private double sigma;
	
	public Gaussian(double mu, double sigma){
		this.mu = mu;
		this.sigma = sigma;
	}
	
	@Override
	public double eval(double x) {
		return ( 1.0d / (sigma * Math.sqrt(2.0d * Math.PI)) ) * Math.exp(-Math.pow(x - mu, 2) / (2.0d * Math.pow(sigma, 2.0d)));
	}

}
